/**
* ApeDSLib - Falleco DS Library
* Copyright (C) 2009  Crisanto, Israel (Falleco)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*/

#ifndef _APEDSLIB_SCREEN_HPP_
#define _APEDSLIB_SCREEN_HPP_

#include <nds.h>
#include <nds/arm9/console.h>
#include <stdio.h>

#include "Canvas.hpp"

/**
* Gerencia uma tela virtualmente
*/
class Screen {


   /**
   * Guarda até 2 ponteiros para as duas páginas de memória usadas
   */
   u16* back;

   /**
   * Usar flipping ? 
   */
   bool flipping;
protected:

public:
   /**
   * Um canvas para lidar com a tela
   */
   Canvas* scr;

   /**
   * Construtor padrão
   */
   Screen(int bg, bool f = true);

   /**
   * Destrutor padrão
   */
   ~Screen( void );

   /**
   * Troca as páginas de memória
   */
   void flip( void );

   int bgId;

};

#endif //~ _APEDSLIB_SCREEN_HPP_